package com.wuyixu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wuyixu.dao.HouseOrderMapper;
import com.wuyixu.domain.HouseOrder;
import com.wuyixu.domain.HouseType;
import com.wuyixu.domain.HouseVo;
import com.wuyixu.service.HouserOrderService;
@Service
@Transactional()
public class HouseOrderServiceImpl implements HouserOrderService {
	@Autowired
	private HouseOrderMapper mapper;

	public int addHouseOrder(List<HouseOrder> h) {
		// TODO Auto-generated method stub
		return mapper.addHouseOrder(h);
	}

	public List<HouseType> selectById() {
		// TODO Auto-generated method stub
		return mapper.selectById();
	}

	public PageInfo<HouseOrder> getAll(HouseVo vo, Integer pageNum) {
		// TODO Auto-generated method stub
		PageHelper.startPage(pageNum, 5);
		List<HouseOrder> list = mapper.getAll(vo);
		PageInfo<HouseOrder> pageInfo = new PageInfo<HouseOrder>(list);
		return pageInfo;
	}

	public void addHouse(HouseOrder h) {
		// TODO Auto-generated method stub
		mapper.addHouse(h);
	}
	
}
